//
//  CmnFunc.h
//  CmnLib
//
//  Created by 21CN Vgo on 10-8-16.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CmnFunc : NSObject {

}

+ (NSString *)GetSettingPath;

+ (BOOL)SaveProperty:(NSString *)value forKey:(NSString *)key;
+ (NSString*)GetPropertyWithKey:(NSString *)key;

+ (float)getTotalDiskSpaceInBytes;
+ (float)getFreeDiskSpaceInBytes;
+ (NSString*)getDocumentDirectory;
+ (NSString*)getPrivateDocumentDirectory;
+ (NSString*)getLibraryDirectory;
+ (NSString*)getCachesDirectory;
+ (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL;

+ (NSString*)URLEncode:(NSString*)origString;
+ (NSString*)URLDecode:(NSString*)origString;

+ (BOOL)isEmail:(NSString *)email;
+ (BOOL)isPhoneNumber:(NSString *)phoneNumber;

+ (void)setCurrentConfig:(NSString *)currentConfig;
+ (NSDictionary *)getCurrentConfigDictionary;
+ (NSDictionary *)urlQueryToDictionary:(NSString *)query;

+ (BOOL)checkCanUseWifi;
+ (BOOL)checkCanUseNetwork;

+ (unsigned int)countCores;
+ (NSString*)inputStreamMD5:(NSInputStream *)inputStream;

@end
